refactor(Project): enhance logging and parameter handling#213
Conversation
| [System.Environment]::SetEnvironmentVariable($moduleDEbugLoggingVarName, $logFilePath) | ||
| } | ||
|
|
||
| function get-DebugSections(){ |
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'get-DebugSections' uses a plural noun. A singular noun should be used instead. Warning
| return $sections | ||
| } | ||
|
|
||
| function set-DebugSections($sections){ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'set-DebugSections' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| return $sections | ||
| } | ||
|
|
||
| function set-DebugSections($sections){ |
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'set-DebugSections' uses a plural noun. A singular noun should be used instead. Warning
| return $logfile | ||
| } | ||
|
|
||
| function set-LogFile($logFilePath){ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'set-LogFile' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| [System.Environment]::SetEnvironmentVariable($moduleDEbugLoggingVarName, $logFilePath) | ||
| } | ||
|
|
||
| function get-VerboseSections{ |
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'get-VerboseSections' uses a plural noun. A singular noun should be used instead. Warning
| return $sections | ||
| } | ||
|
|
||
| function set-VerboseSections($sections){ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'set-VerboseSections' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| return $sections | ||
| } | ||
|
|
||
| function set-VerboseSections($sections){ |
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'set-VerboseSections' uses a plural noun. A singular noun should be used instead. Warning
| [Alias("New-Issue")] | ||
| param ( | ||
| [Parameter(Mandatory, Position = 0)][string]$ItemId, | ||
| [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName, Position = 0)][Alias("Id")][string]$ItemId, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
| [Alias("New-Issue")] | ||
| param ( | ||
| [Parameter(Mandatory, Position = 0)][string]$ItemId, | ||
| [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName, Position = 0)][Alias("Id")][string]$ItemId, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
| if( -not $DontShow){ | ||
| # Get function to show item | ||
| $ShowProjectItemScriptBlock = $ShowProjectItemScriptBlock ?? { param($parameters) Show-ProjectItem @parameters } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Streamline debug and verbose section handling, improve debug logging and cache management, and enhance parameter handling for project-related functions. This update also introduces a new parameter for controlling item display in the Use-Order function.